package com.company.matrix;

public class MatrixPrinter {
    public static void print(int[][] matrix){
        StringBuilder stringBuilder=new StringBuilder();
        stringBuilder.append("{\n");
        for (int[] ints : matrix) {
            stringBuilder.append("  [");
            for (int i = 0; i < ints.length; i++) {
                stringBuilder.append(ints[i]);
                if (i !=ints.length-1) {
                    stringBuilder.append(",");
                }
            }
            stringBuilder.append("]\n");
        }

        stringBuilder.append("}");
        System.out.println(stringBuilder.toString());
    }
}
